<?php $replyClass ='user';
if($reply['Comment']['user_type'] == Comment::OWNER_TYPE){
	$replyClass = 'owner';
}
?>
<div class="replyPosted <?php echo $replyClass;?>">
	<div class="replyUserImage">
		<?php if(isset($reply['Profile']['icon_image']) && is_file(Configure::read('User.upload_dir_prefix').$reply['Profile']['icon_image'])): 
		echo $this->Html->image(Configure::read('User.upload_path_prefix').$reply['Profile']['icon_image'], array('alt' => 'user name', 'width' => '32', 'height' => '32'));
		else:
			echo $this->Html->image(Configure::read('User.default_icon_image'), array('alt' => 'user name', 'width' => '32', 'height' => '32'));
		endif; ?>
	</div>
	<div class="content">
		<h4 class="usernames">
			<?php if(is_array($reply['Profile']) && count($reply['Profile']) > 0 ): ?>
			<?php echo $this->Html->link($this->User->getUsername($reply), array('controller' => 'profile', 'action' => 'view', $reply['Profile']['user_id'])); ?>
			<?php endif; ?>
			<?php if($reply['Comment']['user_type'] == Comment::OWNER_TYPE): ?>
			<span class="roleOwner">【講師】</span>
			<?php endif; ?>
		</h4>
		<div class="description">
			<?php echo $reply['Comment']['content']; ?>
		</div>
		<div class="deleteButton">
			<?php if($userLogon && $userId == $reply['Comment']['user_id']): ?>
			<a href="javascript:void(0);" name="<?php echo $reply['Comment']['id'];?>" class="deleteReply">この投稿を削除する</a>
			<?php endif; ?>
		</div>
		<input type="hidden" id="showAll<?php echo $reply['Comment']['id'];?>" value="<?php echo $showAll;?>"/>
	</div>
</div>